@using MVCDemosoft.Models;
@model Product;
@{
    Layout = null;
};
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编辑页</title>
    <style>
        #top1 {
            border: solid 1px;
            width: 500px;
        }
    </style>
</head>

<body>
    <div id="top1">
        <table>
            @if (Model == null)
            {
                <tr hidden>
                    <td>Id</td>
                    <td><input type="text" name="id" value="0"></td>
                </tr>
                <tr>
                    <td>商品名称</td>
                    <td><input type="text" name="name"></td>
                </tr>
                <tr>
                    <td>供应商名称</td>
                    <td><input type="text" name="supplier"></td>
                </tr>
                <tr>
                    <td>价格</td>
                    <td><input type="text" name="balance"></td>
                </tr>
                <tr>
                    <td>库存数量</td>
                    <td><input type="text" name="name"></td>
                </tr>
                <tr>
                    <td>备注</td>
                    <td><input type="text" name="remarks"></td>
                </tr>
                <tr>
                    <td><input type="button" value="保存" id="btnSave"></td>
                    <td><input type="button" value="返回" id="btnCancle"></td>
                </tr>

            }
            else
            {
                <tr hidden>
                    <td>Id</td>
                    <td><input type="text" name="id" value="@Model.Id"></td>
                </tr>
                <tr>
                    <td>商品名称</td>
                    <td><input type="text" name="name" value="@Model.ProductName"></td>
                </tr>
                <tr>
                    <td>供应商名称</td>
                    <td><input type="text" name="supplier" value="@Model.Supplier"></td>
                </tr>
                <tr>
                    <td>价格</td>
                    <td><input type="text" name="price" value="@Model.Price"></td>
                </tr>
                <tr>
                    <td>库存数量</td>
                    <td><input type="text" name="stock" value="@Model.Stock"></td>
                </tr>
                <tr>
                    <td>备注</td>
                    <td><input type="text" name="remarks" value="@Model.Remarks"></td>
                </tr>
                <tr>
                    <td><input type="button" value="保存" id="btnSave"></td>
                    <td><input type="button" value="返回" id="btnCancle"></td>
                </tr>

            }
        </table>
    </div>
    <script src="~/js/jquery.min.js"></script>
    <script src="~/js/base.js"></script>
</body>

</html>